package com.t371.spring.dao.impl;

import com.t371.spring.dao.Mohe;
import com.t371.spring.dao.Printer;
import com.t371.spring.dao.Zhizhang;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Dayingji implements Printer {
    private Mohe mohe;
    private Zhizhang zhizhang;
    @Autowired
    public Dayingji(Mohe mohe, Zhizhang zhizhang) {
        this.mohe = mohe;
        this.zhizhang = zhizhang;
    }
    @Override
    public void print(String text) {
    mohe.print(text);
    }

    @Override
    public void mohe(Mohe mohe) {
this.mohe = mohe;
    }

    @Override
    public void zhizhang(Zhizhang zhizhang) {
this.zhizhang= zhizhang;
    }
}
